<?php

$appid='wxfe7927ebbe6ef42a';
$secret="71e8bdc64676dabf34cbe3c1b2e74413";
$redirectUrl='http%3A%2F%2Fwww.gzcjdx.cn%2FWeChat%2FBus%2Findex.php';
$codeUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=$redirectUrl&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
echo $codeUrl;

//https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfe7927ebbe6ef42a&redirect_uri=http%3A%2F%2Fwww.gzcjdx.cn%2FWeChat%2FBus%2Findex.php&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
//https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
//https://op

//微信返回的信息 snsapi_base
//string(6) "毕节" ["province"]=> string(6) "贵州" ["country"]=> string(6) "中国" ["headimgurl"]=> string(123) "http://wx.qlogo.cn/mmopen/vi_32/Yf8sjXQ4kpKXEu9mVP0txatwfSZtcjG4oibDV0NfrT1kIvr4nlticyASUN3reUWCl3hhL391NR1JiaAX8OcRhD6lw/0" ["privilege"]=> array(0) { } }

//微信返回信息 snsapi_userinfo
///array(9) { ["openid"]=> string(28) "o8VaK0jX_wNmBlq1LsUav-JIdD1M" ["nickname"]=> string(18) "这是测试头像" ["sex"]=> int(1) ["language"]=> string(5) "zh_CN" ["city"]=> string(6) "毕节" ["province"]=> string(6) "贵州" ["country"]=> string(6) "中国" ["headimgurl"]=> string(123) "http://wx.qlogo.cn/mmopen/vi_32/Yf8sjXQ4kpKXEu9mVP0txatwfSZtcjG4oibDV0NfrT1kIvr4nlticyASUN3reUWCl3hhL391NR1JiaAX8OcRhD6lw/0" ["privilege"]=> array(0) { } }